import {Router} from "oh-router";
import Login from "../../pages/login/Login.jsx";
import LayoutManage from "../layout/index.jsx";
import HomeManage from "../home/Home.jsx";
import { LoginCheckMiddleware } from "./middleware/loginCheck.js";
const middlewares = [new LoginCheckMiddleware()]
export const router = new Router({
    middlewares,
    routes: [
        {
            path: '/login',
            element: <Login/>
        },
        {
            path: '/',
            redirect: '/layout-manage'
        },
        {
            path: '/home-manage',
            element: <HomeManage/>
        },
        {
            path: '/layout-manage',
            element: <LayoutManage/>
        },
        {
            path: '*',
            element: "404"
        }
    ]
})

